<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // async 语法糖
        function fn1() {
            return new Promise((resolve, reject) => {
                resolve('hello')
            })
        }
        async function fn2() {
            // return 'hello';
            return undefined;
        }
        fn2().then(data => {
            console.log(data);
        })
    </script>
</body>

</html>